SET(SRC_LIST
cell.cpp
cellaccess.cpp
data.cpp
grid.cpp
hexahedron.cpp
model.cpp
prism.cpp
pyramid.cpp
tetrahedron.cpp
visKDTree.cpp
ucdinputfile.cpp
geobase.cpp
matrix4x4.cpp
quaternion.cpp
trackball.cpp
vis2by2RealMatrixEE.cpp
)

ADD_LIBRARY(tmp_common STATIC
${SRC_LIST}
)

TARGET_LINK_LIBRARIES(tmp_common
QtGui
QtOpenGL
QtCore
${GL_LIBRARY_NAME}
${GLUT_LIBRARY_NAME}
)

ADD_CUSTOM_COMMAND(TARGET tmp_common
POST_BUILD
COMMAND moc -o ${PROJECT_SOURCE_DIR}/vis/common/window.moc   ${PROJECT_SOURCE_DIR}/vis/common/window.h
COMMAND moc -o ${PROJECT_SOURCE_DIR}/vis/common/glwidget.moc ${PROJECT_SOURCE_DIR}/vis/common/glwidget.h
)

ADD_LIBRARY(common STATIC
glwidget.cpp
window.cpp
)
TARGET_LINK_LIBRARIES(common
tmp_common
)

#
#ADD_CUSTOM_COMMAND(TARGET common
#POST_BUILD
#COMMAND rm ${PROJECT_SOURCE_DIR}/vis/common/libtmp_common.a
#)
#

